/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
	const { router, controller } = app;
	// 路由别名
	const subRouter = router.namespace("/api");

	subRouter.get("/", controller.home.index);
	subRouter.post("/login", controller.user.login);
	subRouter.post("/register", controller.user.addUser);
};
